package top.xunfong.probe.controller;

import top.xunfong.common.core.domain.R;
import top.xunfong.api.probe.domain.dto.ProbeDTO;
import top.xunfong.probe.service.ProbeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("/probe")
public class ProbeController {

    @Autowired
    private ProbeService probeService;


    /**
     * 探针数据入库
     *
     * @param probe
     * @return
     */
    @PostMapping("/send")
    public R<String> probe(@RequestBody ProbeDTO probe) {
        probeService.send(probe);
        return R.ok();
    }
}
